4D Chart v13

CT Count

Home

 
4D Chart v13
CT Count

CT Count 


 

CT Count ( area ; scope ) -> Function result 
Parameter Type   Description
area  Longint in 4D Chart area
scope  Longint in -1 = All 0 = Selected >0 = Group ID
Function result  Integer in Number of objects in the area

CT Count returns the number of objects in the area described by scope.

  • If scope equals -1, CT Count returns the number of objects in the document that are not in a group. Groups appear as a single object.
  • If scope equals 0, CT Count returns the number of currently selected that are not in a group. Groups appear as a single object.
  • If scope is greater than 0, it must be the ID for a group and CT Count returns the number of objects inside the group. With this syntax you can get information about objects in a group without ungrouping. You can examine nested groups by using subsequent calls to CT Count.

Example  

This example opens an alert box that displays the number of currently selected objects.

 $Count :=CT Count(Area;0)
 ALERT("You have selected "+String($Count)+" object(s).")

 
PROPERTIES 

Product: 4D Chart
Theme: CT Objects
Number: 14587

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D Chart 1

 
SEE ALSO 

CT Get ID